﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IEnumerable<DataAccessLayer.Room>>" %>

    <table>
        <tr>
            <th></th>
            <th>
                ID
            </th>
            <th>
                RoomNumber
            </th>
            <th>
                RoomStatusID
            </th>
            <th>
                Feature
            </th>
            <th>
                RoomTypeID
            </th>
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr>
            <td>
                <%: Html.ActionLink("Edit", "Edit", new { id=item.ID }) %> |
                <%: Html.ActionLink("Details", "Details", new { id=item.ID })%> |
                <%: Html.ActionLink("Delete", "Delete", new { id=item.ID })%>
            </td>
            <td>
                <%: item.ID %>
            </td>
            <td>
                <%: item.RoomNumber %>
            </td>
            <td>
                <%: item.RoomStatu.Name %>
            </td>
            <td>
                <%: item.Feature %>
            </td>
            <td>
                <%: item.RoomType.RoomTypeName %>
            </td>
        </tr>
    
    <% } %>

    </table>

    <p>
        <%: Html.ActionLink("Create New", "Create") %>
    </p>


